package com.lipaluma.test.db.annotations.assertions;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Execute a request directly in database and test expected values.<br/>
 * Each column to test is defined with {@link Column}
 * @author Mario
 */
@Documented
@Inherited
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface AssertDefinedColumns {
	/**
	 * column to test
	 * @return
	 */
	Column[] columns() default {};
	/**
	 * request to launch for the test
	 * @return
	 */
	String request();

	/**
	 * name of the datasource
	 * @return
	 */
	String dataSource() default "";
	
	/**
	 * define several {@link AssertDefinedColumns} to launch several requests to test
	 * @author Mario
	 *
	 */
	@Documented
	@Inherited
	@Target({ElementType.METHOD})
	@Retention(RetentionPolicy.RUNTIME)
	public @interface List {
		AssertDefinedColumns[] value();
	}
	
}
